Variable Names (chapter 8)

The complete specification for a variable name is:

abbrev.file#(dimexpr,dimexpr,...)

abbrev is the abbreviation for the variable as specified in the data descriptor file

file# is the file number that contains this variable. The default initially is 1.

("set dfile" changes the default).

dimexpr is a dimension expression that locally modifies the current dimension environment.

A dimension expression is used to locally modify the dimension environment for that variable only. Only fixed dimensions can be thus modified.

An absolute dimension expression is:

X|Y|Z|T|LON|LAT|LEV|TIME = value

A relative dimension expression (relative to the current dimension environment):

X|Y|Z|T|LON|LAT|LEV|TIME +/- offset

Examples of variable specifications are:

z.3(lev=500) File 3, absolute dimension expression

tv.1(time-12hr) Relative dimension expression

rh Default file number is used

q.2(t-1,lev=850) Two dimension expressions

z(t+0) This does have uses....

An important note: When you enter a dimension in grid units, GrADS always converts it to world coordinates. Usually this conversion is done using the scaling of the default file. However, when a grid coordinate is supplied within a dimension expression as part of a variable specification, the scaling for that file (ie, the file that variable is to be taken from) is used.

GrADS has a few "predefined" variable names. You can think of these as being variables implicitly contained within any opened gridded file. The variable names are:

lat

lon

lev

When used, they will contain the lat, lon, and lev at the respective grid points, using the scaling of the appropriate file. You can specify: lat.2 for example, to get latitudes on the grid of the 2nd opened data set.